<template>
	<view>
		<u-navbar title-color="#333" back-icon-color="#333333" :border-bottom="false" :is-fixed="true"
			:title="'个人工作详情'"></u-navbar>
		<uc-content :loading="loading">
			<view class="list-item">
				<view class="list-bottom">
					<view>所属企业:</view>
					<view>{{personalWorkInfo.enterpriseName}}</view>
				</view>
			</view>
			<view class="list-item" >
				<view class="list-bottom" >
					<view >职工名称:</view>
					<view>{{personalWorkInfo.userName}}</view>
				</view>
			</view>
			<view class="list-item">
				<view class="list-bottom">
					<view>工作简介:</view>
					<view>{{personalWorkInfo.remark}}</view>
				</view>
			</view>
			<view class="list-item">
				<view class="list-bottom">
					<view>工作内容:</view>
					<view>{{personalWorkInfo.content}}</view>
				</view>
			</view>
			<view class="list-item">
				<view class="list-bottom">
					<view>工作开始时间:</view>
					<view>{{personalWorkInfo.startTime|dateFormat}}</view>
				</view>
			</view>
			<view class="list-item">
				<view class="list-bottom">
					<view>工作结束时间:</view>
					<view>{{personalWorkInfo.endTime|dateFormat}}</view>
				</view>
			</view>
		</uc-content>
		<u-modal v-model="show" :content="content" :show-cancel-button="true" @cancel="show=false"  @confirm="confirm">
		</u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				personalWorkInfo: [],
				loading: false,
				ucId: '',
				content:''
			}
		},
		onLoad(e) {
			this.ucId = e.ucId
		},
		onShow() {
			this.initView()
		},
		methods: {
			initView() {
				this.loading = true
				this.personalWorkInfo = {}
				this.pageNum = 0
				this.getInPersonalWorkVo(this.ucId)
			},
			getInPersonalWorkVo(val) {
				this.utils.request("/api/app/personalWork/getInPersonalWorkVo", {
					ucId: val
				}, "post", "app", true).then(res => {
					this.personalWorkInfo = res.data
					this.loading = false
				}).catch(error => {
					this.loading = false
					console.log(error)
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "../../../uview-ui/libs/css/style.components.scss";

	.list-item {
		padding: 20rpx 40rpx;
		background-color: #fff;
		border-bottom: #999999 1px dashed;

		.list-bottom {
			display: flex;
			margin-top: 10rpx;
			font-size: 28rpx;
			justify-content: space-between;
			color: #333;
		}

		.list-center {
			margin-top: 20rpx;
			font-size: 28rpx;
			color: #999999;
		}
	}

	content {
		padding: 24rpx;
		text-align: center;
	}
</style>
